package com.zhl.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.zhl.model.User;

public interface UserDao {
	
	@Select("select * from user where id = #{id}")
    public User getUser(User user);
    
	@Select("select * from user")
    public List<User> getAllUser();
	
	@Insert("insert into user(username, password) values(#{username}, #{password})")
    public void addUser(User user);
    
	@Update("update user set username = #{username}, password = #{password} where id = #{id}")
    public void updateUser(User user);
    
	@Delete("delete from user where username = #{username}")
    public void deleteUser(String username);

	
    
}